$direction: (
    l left,
    r right,
    t top,
    b bottom
);

@for $i from 0 through 50 {

    .sc-ma-#{$i} {
        margin: #{$i}px !important;
    }

    // margin
    @each $d in $direction {
        .sc-m#{nth($d, 1)}-#{$i} {
            margin-#{nth($d, 2)}: #{$i}px !important;
        }
    }
    
    .sc-pa-#{$i} {
        padding: #{$i}px !important;
    }

    // padding
    @each $d in $direction {
        .sc-p#{nth($d, 1)}-#{$i} {
            padding-#{nth($d, 2)}: #{$i}px !important;
        }
    }
}